From 982aef9de03ea24e50e962a98d41440d3f721095 Mon Sep 17 00:00:00 2001 From: "gm281@boulderdash.cl.cam.ac.uk" Date: Thu, 29 Jul 2004 16:59:11 +0000 Subject: [PATCH] bitkeeper revision 1.1108.40.1 (41092cdfpganwDsmLTIjObLf_WiAXA) CPU migration flag added --- xen/common/dom0_ops.c | 2 ++ xen/common/schedule.c | 4 +++- xen/include/xen/sched.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index 8886878b07..0a4086ef6e 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -248,6 +248,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op) else { domain_pause(d); + if(d->processor != cpu % smp_num_cpus) + set_bit(DF_MIGRATED, &d->flags); set_bit(DF_CPUPINNED, &d->flags); d->processor = cpu % smp_num_cpus; domain_unpause(d); diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 7b12f8f5ab..cc195b31bd 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -193,7 +193,9 @@ void domain_wake(struct domain *d) d->wokenup = NOW(); #endif } - + + clear_bit(DF_MIGRATED, &d->flags); + spin_unlock_irqrestore(&d->state_lock, flags); } diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 7f67e9ee48..0dfa5b0606 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -246,6 +246,7 @@ extern struct domain *task_list; #define DF_DYING 11 /* Death rattle. */ #define DF_RUNNING 12 /* Currently running on a CPU. */ #define DF_CPUPINNED 13 /* Disables auto-migration. */ +#define DF_MIGRATED 14 /* Domain migrated between CPUs. */ static inline int domain_runnable(struct domain *d) { -- 2.30.2